﻿@model IEnumerable<orienta.Helper.DependenciaInfo>

@{
    Layout = "~/Views/Shared/_LayoutPopUpTree.cshtml";
    ViewBag.Title = "Index";
    var id = 0;
}


<form id="form_lupita">
<table width="80%" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td align="right">
            <input type="button" name="buscar" class="boton" style="width:75px;"  value="Seleccionar" onclick="javascript:botonSeleccionarMultiple();"  />
        </td>
    </tr>
</table>

<script language="javascript" type="text/javascript">
    d = new dTree('d');
    d.add(0, -1, 'Dependencias', '', 'Dependencias', '', '..images/trees/base.gif', '../images/trees/base.gif'); 
@foreach (var item in Model)
{
    id = id + 1;
   
    @:d.add(@item.IdDep,@item.IdDepPadre, '@item.DescDep <@item.IdDep-A><input type=checkbox id="seleccionado" name="seleccionado[]"  value="@item.DescDep <@item.IdDep-A>" size="1">', 'javascript:selectAreaMultiple(\'<@item.IdDep-A>\',\'@item.DescDep\')', '@item.DescDep', '', '../images/trees/folder.gif', '../images/trees/folderopen.gif');
}
   
    document.write(d); d.openTo(1, true); d.s(0); 
</script>
</form>